package com.yang.singleton;

/*
* 枚举类
* */
public enum  Singleton8 {
    INSTANCE;


    public static Singleton8 getInstance() {
        return INSTANCE;
    }

    public static void main(String[] args) {
        for (int i = 0; i < 50; i++) {
            new Thread(() -> {
                System.out.println(Singleton8.getInstance().hashCode());
            }).start();
        }
    }
}
